UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '6Fkn1Gh5zotIh9ZvLnhlUWGuCC8LeSvbDFr5VDhFbpY='
WHERE
key_id = '224d4ee388285958e2f99b553de8426da302edf583e93a7d71cd59cc5c88eadc'
AND (
token = '6Fkn1Gh5zotIh9ZvLnhlUWGuCC8LeSvbDFr5VDhFbpY='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)