UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'FAs6FLS/IiTHU0eeNDMDjDr4V6tlQbe4JjkIo0M2A7U='
WHERE
key_id = '048aecf3444ad52a246ef3e92cf07d4c743135e6b04efaf33b92acbaf9ec97ac'
AND (
token = 'FAs6FLS/IiTHU0eeNDMDjDr4V6tlQbe4JjkIo0M2A7U='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)