UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'o7+I8g8BTUu1hPRuXIXSqCGzijFwqQx192m1NLJoEn8='
WHERE
key_id = '4984a965983f0c8cd6b5f06c99fcc8d8fcd70520784a3531f2673f92afaa04d1'
AND (
token = 'o7+I8g8BTUu1hPRuXIXSqCGzijFwqQx192m1NLJoEn8='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)