UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '+i4E7oDgZW0MhmYErVVOVldbUPcHIybOoSCyWXeBCBE='
WHERE
key_id = 'cf1a06ec49b696297e80e23b782c4a9dc7db9681c42160c7d87ac58cf53d6dd9'
AND (
token = '+i4E7oDgZW0MhmYErVVOVldbUPcHIybOoSCyWXeBCBE='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)