UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'dPPfBZS/CzppA1f4ufS001XMqoy8KA4bgipiNfrRnk0='
WHERE
key_id = 'f44178c64c4a0181de04b5201bc471ac6bce3291bd281eb95585cf64c54d3e71'
AND (
token = 'dPPfBZS/CzppA1f4ufS001XMqoy8KA4bgipiNfrRnk0='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)