UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'PioxrhMNbo6DN8zWKT/W09jtEa7QAQw6QS9dtwEYFTE='
WHERE
key_id = '89ca3e25a6af4dfebc5e864aa8bdcf4429804c51966b48db9b2a8e0ed1aa401e'
AND (
token = 'PioxrhMNbo6DN8zWKT/W09jtEa7QAQw6QS9dtwEYFTE='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)