UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'DSvM+CJIzEoSoHsv0DApaF03AoOpFpI3chLMyNjZqIQ='
WHERE
key_id = 'febb986551dd69aeaf84f2257581115c6098a50dbbaea27cfb0e139358ef3147'
AND (
token = 'DSvM+CJIzEoSoHsv0DApaF03AoOpFpI3chLMyNjZqIQ='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)