UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'wp0RjEJi6JAxoK8TxuqePbYif4VPFJ3JiEvVz1qCZsw=' 
WHERE 
  key_id = '5b70979d5c30b2a3f61e7bc9a1cddc9be308c9fee9b40ac704f1e99d6ef27a10' 
  AND (
    token = 'wp0RjEJi6JAxoK8TxuqePbYif4VPFJ3JiEvVz1qCZsw=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00034