UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'u+s9FfxsfMcu329gzjKWoY/f1+6MW5L12+i4s5HFxAI='
WHERE
key_id = 'b41a7e61ad545bee960b1cfdba28068ca737439d46811f9eb4eb0bc58145e5dc'
AND (
token = 'u+s9FfxsfMcu329gzjKWoY/f1+6MW5L12+i4s5HFxAI='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)