UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'HWkbkSpXY3BI80GqBps8e/vJbIjoAHo1PBmN3uQdVqU='
WHERE
key_id = '06c77f753af1471ceedd1cfdd3921e429e89cbf65aa922460dda8a9c18f18c3e'
AND (
token = 'HWkbkSpXY3BI80GqBps8e/vJbIjoAHo1PBmN3uQdVqU='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)