UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '1ex2VpP7Vo8HxLLbLVZvXljvvhB+JHjPjjJsbZMHavU=' 
WHERE 
  key_id = '6ca7c8aec1ecbc9fef351c7ffcd7c867eea946c1a914da9964fbcd924ee5d3b8' 
  AND (
    token = '1ex2VpP7Vo8HxLLbLVZvXljvvhB+JHjPjjJsbZMHavU=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00015