UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'kLsrFFe55fjflnqCLrZCarNzk5l3oa1Xtg/1/1uUvw4='
WHERE
key_id = '2cba3b8eb40e9726dde5c20a55e3e406c14c126ada118e4bfdd4087e64bbe019'
AND (
token = 'kLsrFFe55fjflnqCLrZCarNzk5l3oa1Xtg/1/1uUvw4='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)