UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'L4I3SIDVuWa2JuKnj/O5uI2S3AXrJpPEPDUNCawywNo='
WHERE
key_id = '42d0d25cf0979749f66b873d8efa29e661adf4c992adb24ad61ea99eb47c0a2c'
AND (
token = 'L4I3SIDVuWa2JuKnj/O5uI2S3AXrJpPEPDUNCawywNo='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)