UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '3Dmt9xTRfFMciVgfblmNB35ByW72EDIx/MJ/fz2YMgA='
WHERE
key_id = '14dacb7296ae0ab90604d13ac6a16f4b83b69b55624c5eb8d5656bc02296d415'
AND (
token = '3Dmt9xTRfFMciVgfblmNB35ByW72EDIx/MJ/fz2YMgA='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)