UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '/dxa9ZomyVcjKn4UoWr00wkWrG5qOmsY3rnYIbypc/s=' 
WHERE 
  key_id = '19e0444d71f07815fec5ce045e8b64db8683ac7720d1f54c63385a15fdec312f' 
  AND (
    token = '/dxa9ZomyVcjKn4UoWr00wkWrG5qOmsY3rnYIbypc/s=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00050