UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'HTl9OV7WNhiXIVxTnrLIkw4XA7LEMsOmtY1sisInldk='
WHERE
key_id = 'df5edcb56033bb88a60e853c4c73f6e45b7f3648fb4ca774e584638bdc7fbd6d'
AND (
token = 'HTl9OV7WNhiXIVxTnrLIkw4XA7LEMsOmtY1sisInldk='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)