UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'sbDp9RM+1dp0s8ASuK5PnT5g7aKxjOtKbrDgtPQ8Zb4=' 
WHERE 
  key_id = '43ab41ea8ba243b507c0f4930ad790d12a00fb7a02b2e90a519b83cd9dfbd191' 
  AND (
    token = 'sbDp9RM+1dp0s8ASuK5PnT5g7aKxjOtKbrDgtPQ8Zb4=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00029