UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'lQPjjbW+ZdwJybbTsRc7jdwSXFYqD3TgGZ5QYBMdfNg=' 
WHERE 
  key_id = '099eb0c6d639f8178a0e8fe8f1e16fb3cff99cf2af50877aac8dfa1e2f2b0ab2' 
  AND (
    token = 'lQPjjbW+ZdwJybbTsRc7jdwSXFYqD3TgGZ5QYBMdfNg=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00031