UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'fOOZKQue0SuWrMSoxC4b5QTFDkA5XbrblsA9DX/7zWE=' 
WHERE 
  key_id = '725a61ce7b65bbc7b0a002c8d3c9efd3fc9537735810215a281b4599ff61069b' 
  AND (
    token = 'fOOZKQue0SuWrMSoxC4b5QTFDkA5XbrblsA9DX/7zWE=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00033