UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'F0TJi4jIk/iZ0R40tWt7S65XOGPT+4wiTJe/0B0tFbA='
WHERE
key_id = '908293152b0782c344602ad47b6caecb0120da67bfbe97601e3738403fac8f21'
AND (
token = 'F0TJi4jIk/iZ0R40tWt7S65XOGPT+4wiTJe/0B0tFbA='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)