UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'Fro+B3jTlXJOyXFsK0w4XXcRBQSLvtZyhuwSf2SoX/c='
WHERE
key_id = '4303faeb26ab486bd6304ba44aa8ceff6adc3c704fd2a5c7813c42b730a21232'
AND (
token = 'Fro+B3jTlXJOyXFsK0w4XXcRBQSLvtZyhuwSf2SoX/c='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)