UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'nCFqbRo7g310mgJUpO8uSpviT/gSYhybsR8w6a2rDpE='
WHERE
key_id = '2fd6370b62de2179a8c6f108abc0fc8f1b151242382cc920beaa33c35b0ab54c'
AND (
token = 'nCFqbRo7g310mgJUpO8uSpviT/gSYhybsR8w6a2rDpE='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)