UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'yrrCO1q/eyB3pQ1+mbmiDpCno+zbb41QsPrKsUeGGeI='
WHERE
key_id = '14c81d656bdbb847768ed2e3be04506bb2058207f863fe5b95e4aa46e4a219cd'
AND (
token = 'yrrCO1q/eyB3pQ1+mbmiDpCno+zbb41QsPrKsUeGGeI='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)