UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'zulnDcmHaaPLarU63QLjm8LaQHPCL+XqkxusvoBpjNE='
WHERE
key_id = 'b05b0d68558401f0e4f7af0484a2014f79d55a96fd4622eb9cc1c4bcbce3b095'
AND (
token = 'zulnDcmHaaPLarU63QLjm8LaQHPCL+XqkxusvoBpjNE='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)