UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'aBgdxODFBFgyaPQtYkZ/0cZ+CSwVD1E1sbwr1G7Invs='
WHERE
key_id = 'efd95988724d4e32915181af618dd8d4a0c0f79e7860ab9e439bc4b70b15d66e'
AND (
token = 'aBgdxODFBFgyaPQtYkZ/0cZ+CSwVD1E1sbwr1G7Invs='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)