UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '1AroM/aP7jG8XRJQYYnGmnJr+IebAXl8vA4b0A5ByAE='
WHERE
key_id = '452d976589e9d9944538647783d9702e09477b32954bcb38b541f21de0760b5d'
AND (
token = '1AroM/aP7jG8XRJQYYnGmnJr+IebAXl8vA4b0A5ByAE='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)