UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'fWO3ra0XzaF/hoEDkL3Q7cvBfVDtnoTD/q2Rwy9C3Kc='
WHERE
key_id = '36ba8a067ad9f87c092376f15f7ff39a05b6c4ee82d1355c086f1d34cb1e23fb'
AND (
token = 'fWO3ra0XzaF/hoEDkL3Q7cvBfVDtnoTD/q2Rwy9C3Kc='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)