UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'HTxfLIPUrBG/y79oU4Nfi6FFXflzpKdu4Lh/tkZwgto='
WHERE
key_id = '26f9f0b685bcf6b04be9a88738ea473bb0030608958e50c40e4411746f8aecc0'
AND (
token = 'HTxfLIPUrBG/y79oU4Nfi6FFXflzpKdu4Lh/tkZwgto='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)