UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'EQAdfWjM1Jd/mduGhn2Om4fhm/bVtaarN5i7asLePko='
WHERE
key_id = '74206d4717ff10cb860472e476ac3ac3de753f290108a8f06e34565063b27bb4'
AND (
token = 'EQAdfWjM1Jd/mduGhn2Om4fhm/bVtaarN5i7asLePko='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)