UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'Nsoq6URFti2Wj3jZS6vXwTfHQsB6phuaxm1Rkq+fQJA='
WHERE
key_id = 'f211c9acd0f4dcfc5b804313fff16823659af3315d3f46dc665751a370ac941b'
AND (
token = 'Nsoq6URFti2Wj3jZS6vXwTfHQsB6phuaxm1Rkq+fQJA='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)