UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'l8R/aePPToAwsR2mpvzoLRz0Sw3V7CqY/+PQKI0p/hI='
WHERE
key_id = '81fb142dcfc51cd2ae231ae56d2d7b142084023b3711a7f597bae03da93d2b95'
AND (
token = 'l8R/aePPToAwsR2mpvzoLRz0Sw3V7CqY/+PQKI0p/hI='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)