UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'l+bSIp2vJ+kijaY3Rhtb25Y3lyZGyqHHnlBtRx7N7xE='
WHERE
key_id = '89ee709fb0c94331e128f9a64b2dba506f6485cbea81751a52c8f70cc4d3dfae'
AND (
token = 'l+bSIp2vJ+kijaY3Rhtb25Y3lyZGyqHHnlBtRx7N7xE='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)