UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'eU8A41+WudNX2OH5JkURq7LP9HloK+dy2qK4CnggSz0='
WHERE
key_id = '7e6755304afbf3f3b3e2e83b1b5c7dba09cdfdd81447d49b8a182af1abbde3d4'
AND (
token = 'eU8A41+WudNX2OH5JkURq7LP9HloK+dy2qK4CnggSz0='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)