UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'EZAlDkk6GSIZBX5awLIA4hj/icpdGWBdwidAbiDrWW4=' 
WHERE 
  key_id = '65bab78113a1be0166d76095cd811e9e67ddf532afaef4470f4a69f2e0ee2428' 
  AND (
    token = 'EZAlDkk6GSIZBX5awLIA4hj/icpdGWBdwidAbiDrWW4=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00034